package com.demo.designmode.reponseibility.case2;

/**
 * 蔬菜关键字过滤器
 */
public class VegetablesFilter implements Filter {
    @Override
    public String doFilter(String data, FilterChain filterChain) {
        //过滤蔬菜关键字
        data = filterByWord(data, "蔬菜");
        //拿到控制器，继续调用下一个过滤器
        return filterChain.preHandleRequest(data);
    }
}